import * as api from '@/api/hmmm/subjects'
export default {
  state: {
    objList: []
  },
  mutations: {
    SET_objList (state, data) {
      state.objList = data
    }
  },
  actions: {
    getObjList ({ commit }, data) {
      return new Promise((resolve, reject) => {
        api.list(data).then(res => {
          commit('SET_objList', res.data.items)
          resolve(res)
        }).catch(err => {
          reject(err)
        })
      })
    }
  }
}
